import request from '@/utils/request'

// 查询方剂维护列表
export function listPrescription(query) {
  return request({
    url: '/zhongyao/prescription/list',
    method: 'get',
    params: query
  })
}

// 查询方剂维护详细
export function getPrescription(prescriptionKey) {
  return request({
    url: '/zhongyao/prescription/' + prescriptionKey,
    method: 'get'
  })
}

// 新增方剂维护
export function addPrescription(data) {
  return request({
    url: '/zhongyao/prescription',
    method: 'post',
    data: data
  })
}

// 修改方剂维护
export function updatePrescription(data) {
  return request({
    url: '/zhongyao/prescription',
    method: 'put',
    data: data
  })
}

// 删除方剂维护
export function delPrescription(prescriptionKey) {
  return request({
    url: '/zhongyao/prescription/' + prescriptionKey,
    method: 'delete'
  })
}
